package org.manager.authorize;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

public interface AuthorizeRepository {

	public Set<UserAccount> findUserByUnit(Serializable unitId);
	
	public void addUserAccount(UserAccount user);
	
	public UserAccount loadUser(Serializable userId);
	
	public void modifyUser(UserAccount user);
	
	public int batchDeleteUserAccount(Serializable userId[]);
	
	//====== Role ==========
	
	public List<SystemRole> getAllRole();
	
	public Serializable addRole(SystemRole role);
	
	public SystemRole loadRoleById(Serializable roleId);
	
	public void batchDeleteRoleById(String roleId[]);
	
	public void modifyRole(SystemRole role);
	
	public void authorizeRole(String accountIds[], String roleIds[]);
	
	public List<SystemRole> getAccountsRoles(String accountId);
	
	public void roleAuthority(List<Function> funList, String[] roleArray);
}
